<template>
  <div>
    <h2>我是子组件</h2>
    <p>{{person}}</p>
    <button @click="changeAge">点击改变年龄</button>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    person:Object
  },
  methods:{
    changeAge(){
        // eslint-disable-next-line
        this.person.age = 9 
    }
  },
  data() {
    return {
    }
  },
}
</script>
<style scoped>
</style>